/**
 * jims
 */
package com.jims.master.modules.csm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.beans.Transient;
import java.util.Date;

/**
 * 入库主记录Entity
 * @author zhuq
 * @version 2017-03-16
 */
public class ExpImportMaster extends DataEntity<ExpImportMaster> {

	private static final long serialVersionUID = 1L;
	private String documentNo;		// 入库单号
	private String storageId;		// 库存单位
	private Date importDate;		// 入库日期
	private String supplier;		// 供货方(采购时的供应商)
    private String storageFrom;		// 供货方（其他入库方式的来源库房）
	private Double accountReceivable;		// 应付款
	private String accountPayed;		// 已付款
	private String additionalFee;		// 附加费
	private String importClass;		// 入库类别
	private String accountIndicator;		// 记帐标志
	private Date acctDate;		// 记账日期
	private String acctOperator;		// 记账人
	private String tally;		// 上账标志
	private Date tallyDate;		// 上账日期
	private String tallyOperator;		// 上账人
	private String voucherNo;		// 凭证号
	private String recoveryDocuNo;		// 纠错入库的单据号
	private String createDateStr;
	private String updateDateStr;
	private String accountType; //付款方式
	public String getAccountType() {
		return accountType;
	}
	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}
	@Transient
	public String getCreateDateStr() {
		return createDateStr;
	}
	@Transient
	public void setCreateDateStr(String createDateStr) {
		this.createDateStr = createDateStr;
	}
	@Transient
	public String getUpdateDateStr() {
		return updateDateStr;
	}
	@Transient
	public void setUpdateDateStr(String updateDateStr) {
		this.updateDateStr = updateDateStr;
	}

	public ExpImportMaster() {
		super();
	}

	public ExpImportMaster(String id){
		super(id);
	}

	@Length(min=1, max=32, message="入库单号长度必须介于 1 和 32 之间")
	public String getDocumentNo() {
		return documentNo;
	}

	public void setDocumentNo(String documentNo) {
		this.documentNo = documentNo;
	}
	
	@Length(min=1, max=64, message="库存单位长度必须介于 1 和 64 之间")
	public String getStorageId() {
		return storageId;
	}

	public void setStorageId(String storageId) {
		this.storageId = storageId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getImportDate() {
		return importDate;
	}

	public void setImportDate(Date importDate) {
		this.importDate = importDate;
	}
	
	@Length(min=1, max=64, message="供货方长度必须介于 1 和 64 之间")
	public String getSupplier() {
		return supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}
	
	public Double getAccountReceivable() {
		return accountReceivable;
	}

	public void setAccountReceivable(Double accountReceivable) {
		this.accountReceivable = accountReceivable;
	}
	
	public String getAccountPayed() {
		return accountPayed;
	}

	public void setAccountPayed(String accountPayed) {
		this.accountPayed = accountPayed;
	}
	
	public String getAdditionalFee() {
		return additionalFee;
	}

	public void setAdditionalFee(String additionalFee) {
		this.additionalFee = additionalFee;
	}
	
	@Length(min=1, max=64, message="入库类别长度必须介于 1 和 64 之间")
	public String getImportClass() {
		return importClass;
	}

	public void setImportClass(String importClass) {
		this.importClass = importClass;
	}
	
	@Length(min=0, max=1, message="记帐标志长度必须介于 0 和 1 之间")
	public String getAccountIndicator() {
		return accountIndicator;
	}

	public void setAccountIndicator(String accountIndicator) {
		this.accountIndicator = accountIndicator;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAcctDate() {
		return acctDate;
	}

	public void setAcctDate(Date acctDate) {
		this.acctDate = acctDate;
	}
	
	@Length(min=0, max=64, message="记账人长度必须介于 0 和 64 之间")
	public String getAcctOperator() {
		return acctOperator;
	}

	public void setAcctOperator(String acctOperator) {
		this.acctOperator = acctOperator;
	}
	
	@Length(min=0, max=1, message="上账标志长度必须介于 0 和 1 之间")
	public String getTally() {
		return tally;
	}

	public void setTally(String tally) {
		this.tally = tally;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTallyDate() {
		return tallyDate;
	}

	public void setTallyDate(Date tallyDate) {
		this.tallyDate = tallyDate;
	}
	
	@Length(min=0, max=64, message="上账人长度必须介于 0 和 64 之间")
	public String getTallyOperator() {
		return tallyOperator;
	}

	public void setTallyOperator(String tallyOperator) {
		this.tallyOperator = tallyOperator;
	}
	
	@Length(min=0, max=64, message="凭证号长度必须介于 0 和 64 之间")
	public String getVoucherNo() {
		return voucherNo;
	}

	public void setVoucherNo(String voucherNo) {
		this.voucherNo = voucherNo;
	}
	
	@Length(min=0, max=64, message="纠错入库的单据号长度必须介于 0 和 64 之间")
	public String getRecoveryDocuNo() {
		return recoveryDocuNo;
	}

	public void setRecoveryDocuNo(String recoveryDocuNo) {
		this.recoveryDocuNo = recoveryDocuNo;
	}

    public String getStorageFrom() {
        return storageFrom;
    }

    public void setStorageFrom(String storageFrom) {
        this.storageFrom = storageFrom;
    }
}